package com.liunian.subject.infra.basic.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.liunian.subject.infra.basic.entity.SubjectInfo;
import com.liunian.subject.infra.basic.mapper.SubjectInfoMapper;
import com.liunian.subject.infra.basic.service.SubjectInfoService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class SubjectInfoServiceImpl extends ServiceImpl<SubjectInfoMapper, SubjectInfo> implements SubjectInfoService {

    @Resource
    private SubjectInfoMapper subjectInfoMapper;

    @Override
    public IPage<SubjectInfo> queryPage(SubjectInfo subjectInfo, Page<SubjectInfo> page) {
        return subjectInfoMapper.queryPage(page, subjectInfo);
    }

    @Override
    public SubjectInfo queryById(Long id) {
        return subjectInfoMapper.selectById(id);
    }

    @Override
    public boolean saveSubjectInfo(SubjectInfo subjectInfo) {
        return this.save(subjectInfo);
    }
}
